There is an engine equipped with a variable compression ratio mechanism in order to reduce fuel consumption of an automobile. In this case, unless otherwise specified, the compression ratio means both of a ratio between the cylinder volume at the bottom dead center of the piston and the cylinder volume at the top dead center of the piston, i.e., a so called mechanical compression ratio, and a ratio between a cylinder volume at a closing timing of an intake valve provided in an internal combustion engine and a cylinder volume at the top dead center of the piston, i.e., a so-called actual compression ratio. The higher the compression ratio is, the higher the thermal efficiency of the internal combustion engine attains. For this reason, in order to reduce the fuel consumption of an automobile, it is effective to increase the compression ratio of the internal combustion engine. However, due to the high compression ratio of the internal combustion engine, the pressure and the temperature in the internal combustion engine are increased, so that abnormal combustion such as knocking occurs. In particular, abnormal combustion tends to occur under a condition of a low engine speed and a condition of a high engine output. For this reason, the setting of the appropriate compression ratio varies depending on the output of the engine and the condition of the rotational speed. The variable compression ratio mechanism is a mechanism for increasing the compression ratio in a low load condition and the like where a high compression ratio is possible, and reducing the compression ratio in a high load condition and the like where there is a high possibility of knocking, so that the fuel consumption reduction can be maximized by increasing the compression ratio.
By the way, the setting of the appropriate compression ratio is affected by the outside world in addition the operation condition (rotation speed, output) of the engine. As a known example of the variable compression ratio mechanism taking the influence of the outside world into consideration, there is a control device of an internal combustion engine described in PTL 1 and PTL 2. These known examples disclose a control device of an internal combustion engine that controls the compression ratio according to the detected humidity and a control device of an internal combustion engine that controls the ignition timing according to the change of the compression ratio.